'''
Created on Feb 22, 2013

@author: Justin
'''
import pygame
from pygame.image import load
from os.path import join
from spritehandler import Spritesheet as ss

# Temporarily setup a screen to load images
TMP_SCREEN = pygame.display.set_mode((100,100),0,32)

"""
if os.name == "posix":
    p = os.path.join("images/")
elif os.name == "nt":
    p =  os.path.join("images\\")
else:
    print "Your operating system isn't gonna play this, sorry."
    raise SystemExit
"""

p = "images"

# Backgrounds
MOSSY_ROCK = load(join(p, "blank_terrain.png")).convert_alpha()

# Units
SWAMP_ENEMY = load(join(p, "swamp_enemy.png")).convert_alpha()
KNIGHT = load(join(p, "knight.png")).convert_alpha()


class Background (pygame.sprite.Sprite):
    """ This being a class may be overkill, but if we decide to do more with it
    at least it's here. """
    container = pygame.sprite.Group()
    
    def __init__ (self, image):
        pygame.sprite.Sprite.__init__(self, self.container)
        
        self.changeImage(image)
    
    def changeImage (self, image):
        
        self.image = image
        self.rect = self.image.get_rect()

del TMP_SCREEN

